package com.iqiyi.pps.epg.core.model.record;


public enum RecordTaskStatus {
    NOTIFY_START_RECORD(1),NOTIFY_START_RECORD_FAIL(2), WAIT(100),TASK_START(200), TASK_START_FAIL(201),  TASK_START_UPLOAD(202),  TASK_START_UPLOAD_FAIL(203),
    VIDEO_MERGE(300), VIDEO_MERGE_OVERTIME(302),
    TASK_CANCEL(401), ENTER_LIBRARY(500),
    DADIAN_COMMIT(501), DADIAN_FAIL(502), UPLOAD(500);
    private int statusIndex;

    private RecordTaskStatus(int index) {
        statusIndex = index;
    }

    public int getStatusIndex() {
        return statusIndex;
    }

    public static RecordTaskStatus getTypeByIndex(int typeIndex) {
        for (RecordTaskStatus contentType : values()) {
            if (contentType.getStatusIndex() == typeIndex) {
                return contentType;
            }
        }
        return null;
    }
}
